package test;

public class Dog extends Pet{
    public String variety;//品种类

    public Dog(String name, String health, int age, String variety) {
        super(name, health, age);
        this.variety = variety;
    }

    public String getVariety() {
        return variety;
    }

    public void setVariety(String variety) {
        this.variety = variety;
    }

    public Dog() {
    }
    @Override
    void eat() {
        System.out.println("给狗吃骨头");
    }

    @Override
    void show() {
        System.out.println("品种：'" + variety + '\'' +
                ", 名字'" + name + '\'' +
                ", 健康：'" + health + '\'' +
                ", 年龄" + age);
    }

}
